package com.cj.framework.util;

import android.widget.ImageView;

import java.util.Map;

/**
 * Created by cj on 2016/6/7.
 * Email:781806481@qq.com
 */
public interface IHttp {
    public interface HttpInfoCallback {
        public void onSucceed(Object result);
        public void onFailed(Exception e);
    }

    public interface  HttpInfoCallbackWithIndex{
        public void onSucceed(Object result,int index);
        public void onFailed(Object result,int index);
    }

    public void httpInfoGet(String url, HttpInfoCallback callback);
    public void httpInfoGetWithIndex(String url,HttpInfoCallbackWithIndex callback,int index);
    public void httpInfoPost(String url, Map<String, String> map, HttpInfoCallback callback);
    public void httpInfoPostWithIndex(String url,Map<String,String> map,HttpInfoCallbackWithIndex callbackWithIndex,int index);
    public void httpBitmapGet(String url, HttpInfoCallback callback);
    public void httpBitmapGetWithIndex(String url,HttpInfoCallbackWithIndex callback,int index);
    public void httpBitmapGet(String url, HttpInfoCallback callback, int width, int height);
    public void httpBitmapGet(String url, ImageView imageView);
}
